<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>HelloWorld空白</title>
<script type="text/javascript">
	window.onload = function () {
	var btn = document.getElementById("btnId");
	btn.onclick = function (ev) {
	//alert("hello");
		alert(btn.id);
	};
	};
</script>
</head>
<body>
	<button id="btnId">SayHello</button>
</body>
</html>